package com.tim.soundseechina;

public abstract class Supper {
	private String key;
	private String value;

	private Supper(String key, String value) {
		this.key = key;
		this.value = value;
		absInit();
		methodBefore();
		display1();
		methodEnd();
	}

	public abstract void absInit();

	public static Supper createSupper(String key, String value) {
		Supper supper = new Supper(key, value) {
			public void absInit() {
				System.out.println("init method");
			}
		};
		return supper;
	}

	private void display1() {
		System.out.println(key + ": " + value);
	}

	private void methodBefore() {
		System.out.println("method before.................");
	}

	private void methodEnd() {
		System.out.println("method end....................");
	}
	
	public static void main(String[] args) {
		Supper.createSupper("tim", "赵攀");
	}
}
